﻿<UserControl x:Class="jellyfishDZApp.Step04_Panel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:jf="clr-namespace:Jellyfish.jfDeepZoom;assembly=Jellyfish"
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:slInput="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls.Input"
	Width="Auto" Height="Auto">

	<UserControl.Resources>
		
		
		<!-- Step2 Skin button Start -->
		<ControlTemplate x:Key="PreviousButtonControlTemplate" TargetType="Button">
			<Grid Background="#00000000" x:Name="grid">
				<vsm:VisualStateManager.VisualStateGroups>
					<vsm:VisualStateGroup x:Name="FocusStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition GeneratedDuration="00:00:00.2500000"/>
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="Unfocused">
							<Storyboard/>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Focused">
							<Storyboard/>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
					<vsm:VisualStateGroup x:Name="CommonStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition GeneratedDuration="00:00:00.2500000"/>
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="MouseOver">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                              Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#ffFF0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Pressed">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#Ffcc0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Disabled">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#01ff0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Normal">
							<Storyboard/>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
				</vsm:VisualStateManager.VisualStateGroups>
				<Path HorizontalAlignment="Stretch" Margin="11.9729995727539,9,9,9" VerticalAlignment="Stretch" Fill="#55ff0000"
                      Width="19.027" Stretch="Fill" Data="M-327,102 L-327,138 L-296,121 z"
                      x:Name="path" RenderTransformOrigin="0.5,0.5">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="180"/>
							<TranslateTransform/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</Grid>
		</ControlTemplate>
		<ControlTemplate x:Key="NextButtonControlTemplate" TargetType="Button">
			<Grid Background="#00000000" x:Name="grid">
				<vsm:VisualStateManager.VisualStateGroups>
					<vsm:VisualStateGroup x:Name="FocusStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition GeneratedDuration="00:00:00.2500000"/>
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="Unfocused">
							<Storyboard/>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Focused">
							<Storyboard/>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
					<vsm:VisualStateGroup x:Name="CommonStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition GeneratedDuration="00:00:00.2500000"/>
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="MouseOver">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                              Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#ffFF0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Pressed">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#Ffcc0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Disabled">
							<Storyboard>
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#01ff0000"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Normal">
							<Storyboard/>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
				</vsm:VisualStateManager.VisualStateGroups>
				<Path HorizontalAlignment="Stretch" Margin="11.9729995727539,9,9,9" VerticalAlignment="Stretch" Fill="#55ff0000"
                      Width="19.027" Stretch="Fill" Data="M-327,102 L-327,138 L-296,121 z"
                      x:Name="path" RenderTransformOrigin="0.5,0.5">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="0"/>
							<TranslateTransform/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</Grid>
		</ControlTemplate>
		<!-- Step2 Skin button End -->

		<!-- Step4 Panel Start -->
		<SolidColorBrush x:Key="TitleBar_Brush" Color="#FF00469B"/>
		<Style x:Key="ButtonStyle" TargetType="Button">
			<Setter Property="IsEnabled" Value="true"/>
			<Setter Property="IsTabStop" Value="true"/>
			<Setter Property="Background" Value="#FF003255"/>
			<Setter Property="Foreground" Value="#FF313131"/>
			<Setter Property="MinWidth" Value="5"/>
			<Setter Property="MinHeight" Value="5"/>
			<Setter Property="Margin" Value="0"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Cursor" Value="Arrow"/>
			<Setter Property="FontSize" Value="11"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Grid.Resources>
								<Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color>
								<Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
								<Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
								<Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color>
								<Color x:Key="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</Color>
								<Color x:Key="HoverLinearBevelLightStartColor">#FCFFFFFF</Color>
								<Color x:Key="HoverLinearBevelLightEndColor">#EAFFFFFF</Color>
								<Color x:Key="HoverLinearBevelDarkStartColor">#D8FFFFFF</Color>
								<Color x:Key="HoverLinearBevelDarkEndColor">#4CFFFFFF</Color>
								<Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color>
								<Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
								<SolidColorBrush x:Key="BorderBrush" Color="#FF000000"/>
								<SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF"/>
								<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
								<LinearGradientBrush x:Key="FocusedStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#B2FFFFFF" Offset="0"/>
									<GradientStop Color="#51FFFFFF" Offset="1"/>
									<GradientStop Color="#66FFFFFF" Offset="0.325"/>
									<GradientStop Color="#1EFFFFFF" Offset="0.325"/>
								</LinearGradientBrush>
							</Grid.Resources>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver"/>
										<vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
										<vsm:VisualTransition GeneratedDuration="00:00:00.2000000"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="Normal">
										<Storyboard/>
									</vsm:VisualState>
									<vsm:VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Accent" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DownStroke" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Accent" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.9"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Accent" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1.48"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Accent" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-3"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="FocusStates">
									<vsm:VisualState x:Name="Focused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Unfocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Rectangle x:Name="Background" RadiusX="4" RadiusY="4" Margin="-1.083,-2,1.083,2" Fill="#FF898989" Visibility="Collapsed"/>
							<Rectangle x:Name="BackgroundGradient" StrokeThickness="0.5" RadiusX="4" RadiusY="4" Margin="-0.5,-0.5,0.5,0.5" Stroke="#FF000000">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.699999988079071,1" StartPoint="0.699999988079071,0">
										<GradientStop Color="#FCE4F1FB" Offset="0.996"/>
										<GradientStop Color="#FF95B7E1" Offset="0"/>
										<GradientStop Color="#FCB9D1ED" Offset="0.714"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Rectangle x:Name="BackgrondGradient" StrokeThickness="1.5" RadiusX="4" RadiusY="4" Margin="1,-0.5,1.5,11.5">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.699999988079071,1" StartPoint="0.699999988079071,0">
										<GradientStop Color="#FCE7F4FC" Offset="1"/>
										<GradientStop Color="#FFACCAEA" Offset="0"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Grid Margin="2" x:Name="CurvedBevelScale">
								<Grid.RowDefinitions>
									<RowDefinition Height="7*"/>
									<RowDefinition Height="3*"/>
								</Grid.RowDefinitions>
							</Grid>
							<Rectangle Margin="1,0,1,1" x:Name="Accent" StrokeThickness="2" RadiusX="3" RadiusY="3" Opacity="0" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" Height="12.5">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF5C7797" Offset="0.004"/>
										<GradientStop Color="#0095B7E1" Offset="1"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
								<Rectangle.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleY="-1"/>
										<SkewTransform/>
										<RotateTransform/>
										<TranslateTransform/>
									</TransformGroup>
								</Rectangle.RenderTransform>
							</Rectangle>
							<Grid x:Name="FocusVisual" Visibility="Collapsed" Margin="0,0,0,0" Opacity="0">
								<Rectangle Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Stroke="{TemplateBinding Background}" StrokeThickness="2" RadiusX="3" RadiusY="3"/>
								<Rectangle Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" RadiusX="3" RadiusY="3"/>
							</Grid>
							<Grid x:Name="DownStroke" Opacity="0">
								<Rectangle Margin="1,2,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Margin="1,1.75,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Margin="1,1.5,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Margin="1,1.25,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Margin="1" Opacity="1" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3"/>
								<Rectangle Margin="1" StrokeThickness="1" RadiusX="4" RadiusY="4">
									<Rectangle.Stroke>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#A5FFFFFF" Offset="0"/>
											<GradientStop Color="#FFFFFFFF" Offset="1"/>
										</LinearGradientBrush>
									</Rectangle.Stroke>
								</Rectangle>
							</Grid>
							<ContentPresenter HorizontalAlignment="Center" Margin="4,5,4,4" />
							<Rectangle x:Name="DisabledVisual" IsHitTestVisible="false" Opacity="0" Fill="{StaticResource DisabledBrush}" RadiusX="4" RadiusY="4"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<!-- Step4 Panel End -->


	</UserControl.Resources>


	<Grid x:Name="LayoutRoot" Background="Black">
		<jf:JFDeepZoom x:Name="jfd" Width="800" Height="600" Src="GeneratedImages/dzc_output.xml"
              PreviousButtonTemplate="{StaticResource PreviousButtonControlTemplate}"
              NextButtonTemplate="{StaticResource NextButtonControlTemplate}"
					   />

		<Button Height="20" HorizontalAlignment="Right" Margin="0,0,130,10" x:Name="FullScreen_Button" VerticalAlignment="Bottom" Width="20" RenderTransformOrigin="0.333,0.667" Content="F"/>
		<Button Height="20" HorizontalAlignment="Right" Margin="0,0,70,10" x:Name="ZoomIn_Button" VerticalAlignment="Bottom" Width="20" RenderTransformOrigin="0.333,0.667" Content="+"/>
		<Button Height="20" HorizontalAlignment="Right" Margin="0,0,40,10" x:Name="ZoomOut_Button" VerticalAlignment="Bottom" Width="20" RenderTransformOrigin="0.333,0.667" Content="-"/>
		<Button Height="20" HorizontalAlignment="Right" Margin="0,0,100,10" x:Name="ZoomFit_Button" VerticalAlignment="Bottom" Width="20" RenderTransformOrigin="0.5,0.5" Content="R" />
		<Button Height="20" HorizontalAlignment="Right" Margin="0,0,10,10" x:Name="Panel_Button" VerticalAlignment="Bottom" Width="20" RenderTransformOrigin="0.333,0.667" Content="P" />




		<!-- Step4 Panel Start -->
		<Grid Height="150" x:Name="ControlShowAreaGrid" Visibility="Collapsed" Margin="0,0,10,40" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="660">
			<!-- This StackPanel is for Other Control Area. This StackPanel has LayoutControl(line, spiral,spread, tile..), Reset, SlideshowControl,
            Min/Max zoom value, SubImage control. -->
			<Rectangle Fill="#FFE4E4E4" Stroke="{x:Null}" RadiusX="3" RadiusY="3"/>

			<!-- LayOut -->
			<StackPanel Orientation="Horizontal" Height="27" Margin="10,0,10,115" VerticalAlignment="Bottom">
				<StackPanel Orientation="Horizontal">
					<Rectangle Width="4" Height="18" Fill="{StaticResource TitleBar_Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,3,0,0" />
					<TextBlock Text="Layout:" Foreground="#FF002A6D" Margin="10,4,0,0" HorizontalAlignment="Left" FontSize="11" VerticalAlignment="Top" />
				</StackPanel>
				<Button x:Name="LineButton" Content="Line" Style="{StaticResource ButtonStyle}" Height="27" Margin="14,0,0,0" Width="84"/>
				<Button x:Name="SnowCrystalButton" Content="Snow Crystal" Style="{StaticResource ButtonStyle}" Margin="4,0,0,0" Width="80.799" />
				<Button x:Name="SpiralButton" Content="Spiral" Style="{StaticResource ButtonStyle}" Margin="5,0,0,0" Width="82.783" />
				<Button x:Name="SpreadButton" Content="Spread"  Style="{StaticResource ButtonStyle}" Margin="4,0,0,0" Width="81.975" />
				<Button x:Name="TileButton" Content="Tile" Style="{StaticResource ButtonStyle}" Margin="4,0,0,0" Width="83.443" />
				<Button x:Name="ShrinkButton" Content="Shirink" Style="{StaticResource ButtonStyle}"  Margin="3,0,0,0" Width="82.867"  />

			</StackPanel>
			<!-- This area is for SlideShow, Zoom -->
			<StackPanel Orientation="Horizontal" x:Name="slideshow_sp" HorizontalAlignment="Left" Height="27" Margin="10,0,0,80" VerticalAlignment="Bottom">
				<!-- This area is for SlideShow -->
				<StackPanel Orientation="Horizontal">
					<Rectangle Width="4" Height="18" Fill="{StaticResource TitleBar_Brush}" Margin="0,0,0,2" />
					<TextBlock Text="Slide Show:" Foreground="#FF002A6D" Margin="9,5,0,0" HorizontalAlignment="Left" FontSize="11" />
				</StackPanel>
				<Button x:Name="PrevButton" Content="&lt;&lt;" Style="{StaticResource ButtonStyle}" Margin="18,0,0,0" Width="83.488" Height="Auto" VerticalAlignment="Stretch" />
				<Button x:Name="StopButton" Content="o" Style="{StaticResource ButtonStyle}" Margin="5,0,0,0" Width="40.757" Height="Auto" VerticalAlignment="Stretch" />
				<Button x:Name="PlayButton" Content="&gt;" Style="{StaticResource ButtonStyle}" Margin="5,0,0,0" Width="42.744" Height="Auto" VerticalAlignment="Stretch" />
				<Button x:Name="FFButton" Content="&gt;&gt;" Style="{StaticResource ButtonStyle}" Margin="4,0,0,0" Width="81.488" Height="Auto" VerticalAlignment="Stretch" />
				<Button x:Name="FitButton" Content="Fit" Style="{StaticResource ButtonStyle}" Width="82.691" Height="Auto" VerticalAlignment="Stretch" Margin="50,0,0,0" />
				<Button x:Name="DefaultPositionButton" Content="Default Position" Style="{StaticResource ButtonStyle}" Width="105.589" Height="Auto" VerticalAlignment="Stretch" />
				<!-- This area is for set zoom value. -->
			</StackPanel>
			<StackPanel Orientation="Horizontal" x:Name="header_sp" Height="27" Margin="10,0,10,45" VerticalAlignment="Bottom">
				<Rectangle Width="4" Height="20" Fill="{StaticResource TitleBar_Brush}" HorizontalAlignment="Left" VerticalAlignment="Top" />
				<TextBlock Text="Set SubImage:" Foreground="#FF002A6D" Margin="10,4,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="11" />
				<!-- Index -->
				<TextBlock Text="Index:" FontSize="11" Foreground="#FF000000" Margin="20,0,0,0" Width="37"/>
				<slInput:NumericUpDown Minimum="0" Maximum="500" Width="55" Height="27" x:Name="SubImageIndex_NumericUpDown"/>

				<!-- Width -->
				<TextBlock Text="W:" FontSize="11" Foreground="#FF000000" Margin="5,0,0,0" Width="16"/>

				<slInput:NumericUpDown Minimum="0" Maximum="2000" Width="60" Height="27" Value="50" Increment="50" x:Name="SubImageWidth_NumericUpDown"/>

				<Button x:Name="SetWidthButton" Content="Set Width"  Style="{StaticResource ButtonStyle}" Width="82" Margin="5,0,0,0" />
				<!-- X -->
				<TextBlock Text="X:" FontSize="11" Foreground="#FF000000" Margin="20,0,0,0"/>
				<slInput:NumericUpDown Minimum="0" Maximum="2000" Width="60" Height="27" Value="50" Increment="50" x:Name="SubImageX_NumericUpDown"/>

				<!-- Y -->
				<TextBlock Text="Y:" FontSize="11" Foreground="#FF000000" Margin="5,0,0,0"/>
				<slInput:NumericUpDown Minimum="0" Maximum="2000" Width="60" Height="27" Value="50" Increment="50" x:Name="SubImageY_NumericUpDown"/>

				<Button x:Name="SetXYButton" Content="Set X,Y"  Style="{StaticResource ButtonStyle}" Width="83" Margin="5,0,0,0" />

			</StackPanel>
			<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="10,0,0,10" x:Name="controls_sp" Height="27">

				<StackPanel Orientation="Horizontal" Height="25.90283203125" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0">
					<StackPanel Orientation="Horizontal" Height="22.537109375" Width="59.2174491882324">
						<Rectangle Width="4" Height="18" Fill="{StaticResource TitleBar_Brush}" />
						<TextBlock Text="Zoom:" Foreground="#FF002A6D" Margin="8,2,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" Margin="15,0,0,0">
						<TextBlock Text="Max:" Foreground="#FF000000"/>
						<TextBlock x:Name="MaxZoomTb" Width="40" Foreground="#FF848484" />
						<Button x:Name="SetMaxZoomButton" Content="Set Max" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="80.943" Margin="5,0,0,0" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,0,0,0">
						<TextBlock Text="Min:" Foreground="#FF000000"/>
						<TextBlock x:Name="MinZoomTb" Width="40" Foreground="#FF848484" HorizontalAlignment="Left" VerticalAlignment="Stretch" />
						<Button x:Name="SetMinZoomButton" Content="Set Min" Style="{StaticResource ButtonStyle}" Width="82.128" />
					</StackPanel>
					<Button x:Name="ResetZoomValueButton" Content="Reset Min/MaxZoom" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="7,0,0,0" Width="142.392" />
				</StackPanel>
			</StackPanel>

		</Grid>
		<!-- Step4 Panel End -->




	</Grid>
</UserControl>
